@import "variables";

mix {
  seed-cycle {
    .cycle-container {
      .title {
        display: flex;
        flex-direction: column-reverse;
        height: pxTorem(140);
        line-height: inherit;
        padding-right: pxTorem(70);
        padding-bottom: pxTorem(22);
        background: linear-gradient(transparent, rgba(0, 0, 0, .6));
        span {
          width: 100%;
        }
      }
      .cycle-pagination {
        left: 0;
        right: 0;
        bottom: pxTorem(12);
        justify-content: center;
        height: auto;
        .cycle-pagination-bullet {
          width: 4px;
          height: 4px; // border-radius: 1.5px;
          background-color: #fff;
          opacity: 1;
          &.active {
            background-color: color($h5, c1);
          }
        }
      }
    }
  }

  /*goods*/
  .goods-module + .no-title {
    margin-top: pxTorem(-10) !important;
  }

  .goods-module {
    margin-top: pxTorem(15); // padding-top: pxTorem(26);
    background-color: #fff;
    &:first-of-type {
      margin-top: pxTorem(20);
    }
    .module-content{
      padding: pxTorem(26) 3% pxTorem(10) 3%;
    }
    &.no-title {
      margin-top: 0;
      .module-content{
        padding-top: 0;
      }
    }
    .module-title {
      padding-top: pxTorem(26);
      h1 {
        padding: 0 pxTorem(24);
        font-weight: 600;
        border-left: pxTorem(6) solid color($h5, c1);
        @include font-dpr(30px);
        color: color($h5, c2);
      }
    }
    .price-box {
      max-width: 100%;
      min-height: pxTorem(44);
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
      .symbol {
        font-size: 12px; // vertical-align: text-top;
        color: color($h5, c15);
      }
      .price {
        font-weight: bold;
        font-size: standard($f, f2);
        color: color($h5, c15);
      }
      .free {
        @include font-dpr(27px);
      }
    }
    .goods-list {
      //display: flex;
      flex-wrap: wrap;
      //padding: pxTorem(26) 3% pxTorem(10) 3%;
    }
    .goods-card {
      margin-bottom: pxTorem(20);
      seed-img {
        width: 100%;
        height: 100%;
        img {
          width: 100%;
        }
      }
      .content{
        padding: pxTorem(16) pxTorem(36) pxTorem(12) pxTorem(20);
      }
      .title {
        //margin-bottom: pxTorem(12);
        width: 100%;
        color: color($h5, c2);
      }
    }
  }
}

// 组合模块和服务优选模块公用样式
.custom-module, .recommend-module {

  // 一行两列
  .half {
    width: 48.5%;
    .title {
      @include multi-line-exllipsis(2);
    }
    .container {
      height: 100%;
    }
    .goods-container {
      border: 1px solid color($h5, c9);
      .content {
        padding: pxTorem(16) pxTorem(36) pxTorem(12) pxTorem(20);
      }
      .title-box {
        min-height: pxTorem(76);
      }
    }
    //图文链接
    .image-container {
      .content {
        min-height: pxTorem(126);
        padding-right: pxTorem(36);
      }
    }
  }
}

// 组合模块（多种布局）
.custom-module {
  .full,
  .half {
    //图文链接
    .image-container {
      position: relative;
      .cover {
        height: 100%;
      }
      .content {
        position: absolute;
        left: 0;
        bottom: 0;
        width: 100%;
        padding-top: pxTorem(22);
        padding-left: pxTorem(20);
        padding-bottom: pxTorem(18);
        border: none;
        background: linear-gradient(transparent, rgba(0, 0, 0, .6));
      }
      .title {
        height: auto;
        margin: 0;
        color: #fff;
      }
    }
  }
  //一行一列
  .full {
    width: 100%; //商品
    flex-grow: 1;
    .goods-container {
      display: flex;
      align-items: center;
      text-align: left;
      .cover {
        width: 50%;
        padding-right: pxTorem(10);
      }
      .content {
        width: 50%;
        padding: 0 pxTorem(20);
        border: none;
      }
      .title {
        height: auto;
        @include multi-line-exllipsis(2);
      }
    }
    //图文链接
    .image-container {
      .content {
        padding-right: pxTorem(54);
      }
      img {
        //height: pxTorem(370);
      }
      .title {
        min-height: auto;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
      }
    }
  }

  .third, .quarter {
    .image-container {
      .title {
        margin-bottom: 0 !important;
      }
    }
  }
  // 一行三列
  .third {
    width: 31.5%;
    border: 1px solid color($h5, c9);
    &:nth-of-type(3n) {
      margin-right: 0;
    }
    .content {
      padding: pxTorem(16) pxTorem(36) pxTorem(20) pxTorem(20);
    }
  }
  // 一行四列
  .quarter {
    width: 23%;
    border: 1px solid color($h5, c9);
  }
}

// 一行多列模块
.columns-module {
  flex-wrap: wrap;
  //padding: 0 3%;
  //padding: pxTorem(26) 3% pxTorem(10) 3%;
  &.three-columns {
    max-width: 100%;
    display: flex;
    .item {
      width: 31.5%;
      &:nth-child(3n) {
        margin-right: 0;
      }
    }
  }
  &.four-columns {
    max-width: 100%;
    display: flex;
    .item:nth-child(4n) {
      margin-right: 0;
    }
    .item {
      width: 23%;
      &:nth-child(4n) {
        margin-right: 0;
      }
    }
  }
  .item {
    margin-bottom: pxTorem(16);
    margin-right: 2.5%;
    border: 1px solid color($h5, c9);
  }
  seed-img {
    width: 100%;
    height: 100%;
  }
  .text-content {
    padding: pxTorem(16);
    .title {
      width: 100%;
    }
  }
}

// 滑动模块
.scroll-module {
  display: block;
  overflow-y: scroll;
  max-width: inherit;
  white-space: nowrap;
  //padding: pxTorem(26) 3% pxTorem(10) 3%;
  .scroll-goods {
    display: inline-block;
    width: 27%;
  }
  .scroll-banner {
    width: 85%;
  }
  .item {
    display: inline-block;
    margin-right: 3%;
    margin-bottom: pxTorem(16);
    border: 1px solid color($h5, c9);
    &:last-of-type {
      margin-right: 0;
    }
  }
  seed-img {
    width: 100%;
    height: 100%;
  }
  .text-content {
    padding: pxTorem(16);
    .title {
      width: 100%;
    }
  }
}

